package com.wk.springboot.spring.controller;

import com.wk.springboot.spring.service.MyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * @User admin
 * @Date 2020/11/24 10:14
 **/
@Controller
public class MyController{

    MyService myService;

    public void hello(){
        myService.hello();
    }

    @Autowired
    public MyController(MyService myService) {
        this.myService = myService;
        System.out.println("创建controller");
    }

}
